package com.aku;

import javax.swing.*;
import java.net.URL;

/**
 * 本类用于获取所有图片
 * 将图片封装为一个对象！！！
 */
public class Images {

    //URL bodyURL=Images.class.getResource("/");
    // "/"=/D:/idea_workspace/Snake/out/production/Snake/ 相对路径
    //路径---封装对象
    public static URL bodyURL=Images.class.getResource("/images/body.png");
    //将图片---封装对象
    public static ImageIcon bodyImg=new ImageIcon(bodyURL);

    //路径---封装对象
    public static URL downURL=Images.class.getResource("/images/down.png");
    //将图片---封装对象
    public static ImageIcon downImg=new ImageIcon(downURL);

    //路径---封装对象
    public static URL foodURL=Images.class.getResource("/images/food.png");
    //将图片---封装对象
    public static ImageIcon foodImg=new ImageIcon(foodURL);

    //路径---封装对象
    public static URL headerURL=Images.class.getResource("/images/header.png");
    //将图片---封装对象
    public static ImageIcon headerImg=new ImageIcon(headerURL);

    //路径---封装对象
    public static URL leftURL=Images.class.getResource("/images/left.png");
    //将图片---封装对象
    public static ImageIcon leftImg=new ImageIcon(leftURL);

    //路径---封装对象
    public static URL rightURL=Images.class.getResource("/images/right.png");
    //将图片---封装对象
    public static ImageIcon rightImg=new ImageIcon(rightURL);

    //路径---封装对象
    public static URL upURL=Images.class.getResource("/images/up.png");
    //将图片---封装对象
    public static ImageIcon upImg=new ImageIcon(upURL);



}
